package com.furongji.education.service.impl;

import com.furongji.education.domain.po.LoginLog;
import com.furongji.education.mapper.LoginLogMapper;
import com.furongji.education.service.LoginLogService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 用户登录日志表 服务实现类
 * </p>
 *
 * @author furongji
 * @since 2025-06-01
 */
@Service
public class LoginLogServiceImpl extends ServiceImpl<LoginLogMapper, LoginLog> implements LoginLogService {

    @Override
    public void insertLoginLog(String userId, String ip, String userAgent) {
        LoginLog loginLog = new LoginLog();
        loginLog.setUserId(userId);
        loginLog.setIpAddress(ip);
        loginLog.setUserAgent(userAgent);
        super.save(loginLog);
    }
}
